home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / Retrace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  3.8 KB  |  139 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Retrace.h
  3.  
  4.      Contains:    Vertical Retrace Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __RETRACE__
  18. #define __RETRACE__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __OSUTILS__
  24. #include <OSUtils.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #if PRAGMA_ONCE
  30. #pragma once
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40.  
  41. #if PRAGMA_STRUCT_ALIGN
  42.     #pragma options align=mac68k
  43. #elif PRAGMA_STRUCT_PACKPUSH
  44.     #pragma pack(push, 2)
  45. #elif PRAGMA_STRUCT_PACK
  46.     #pragma pack(2)
  47. #endif
  48.  
  49. typedef struct VBLTask                     VBLTask;
  50. typedef VBLTask *                        VBLTaskPtr;
  51. typedef CALLBACK_API( void , VBLProcPtr )(VBLTaskPtr vblTaskPtr);
  52. /*
  53.     WARNING: VBLProcPtr uses register based parameters under classic 68k
  54.              and cannot be written in a high-level language without 
  55.              the help of mixed mode or assembly glue.
  56. */
  57. typedef REGISTER_UPP_TYPE(VBLProcPtr)                             VBLUPP;
  58.  
  59. struct VBLTask {
  60.     QElemPtr                         qLink;
  61.     short                             qType;
  62.     VBLUPP                             vblAddr;
  63.     short                             vblCount;
  64.     short                             vblPhase;
  65. };
  66.  
  67. enum { uppVBLProcInfo = 0x00009802 };                             /* register no_return_value Func(4_bytes:A0) */
  68. #define NewVBLProc(userRoutine)                                 (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
  69. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  70.     #pragma parameter CallVBLProc(__A1, __A0)
  71.     void CallVBLProc(VBLUPP routine, VBLTaskPtr vblTaskPtr) = 0x4E91;
  72. #else
  73.     #define CallVBLProc(userRoutine, vblTaskPtr)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppVBLProcInfo, (vblTaskPtr))
  74. #endif
  75. EXTERN_API( QHdrPtr )
  76. GetVBLQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
  77.  
  78.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  79.                                                                                             #pragma parameter __D0 SlotVInstall(__A0, __D0)
  80.                                                                                             #endif
  81. EXTERN_API( OSErr )
  82. SlotVInstall                    (QElemPtr                 vblBlockPtr,
  83.                                  short                     theSlot)                            ONEWORDINLINE(0xA06F);
  84.  
  85.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  86.                                                                                             #pragma parameter __D0 SlotVRemove(__A0, __D0)
  87.                                                                                             #endif
  88. EXTERN_API( OSErr )
  89. SlotVRemove                        (QElemPtr                 vblBlockPtr,
  90.                                  short                     theSlot)                            ONEWORDINLINE(0xA070);
  91.  
  92.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  93.                                                                                             #pragma parameter __D0 AttachVBL(__D0)
  94.                                                                                             #endif
  95. EXTERN_API( OSErr )
  96. AttachVBL                        (short                     theSlot)                            ONEWORDINLINE(0xA071);
  97.  
  98.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  99.                                                                                             #pragma parameter __D0 DoVBLTask(__D0)
  100.                                                                                             #endif
  101. EXTERN_API( OSErr )
  102. DoVBLTask                        (short                     theSlot)                            ONEWORDINLINE(0xA072);
  103.  
  104.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  105.                                                                                             #pragma parameter __D0 VInstall(__A0)
  106.                                                                                             #endif
  107. EXTERN_API( OSErr )
  108. VInstall                        (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA033);
  109.  
  110.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  111.                                                                                             #pragma parameter __D0 VRemove(__A0)
  112.                                                                                             #endif
  113. EXTERN_API( OSErr )
  114. VRemove                            (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA034);
  115.  
  116.  
  117.  
  118.  
  119. #if PRAGMA_STRUCT_ALIGN
  120.     #pragma options align=reset
  121. #elif PRAGMA_STRUCT_PACKPUSH
  122.     #pragma pack(pop)
  123. #elif PRAGMA_STRUCT_PACK
  124.     #pragma pack()
  125. #endif
  126.  
  127. #ifdef PRAGMA_IMPORT_OFF
  128. #pragma import off
  129. #elif PRAGMA_IMPORT
  130. #pragma import reset
  131. #endif
  132.  
  133. #ifdef __cplusplus
  134. }
  135. #endif
  136.  
  137. #endif /* __RETRACE__ */
  138.  
  139.